package com.orangelife.utils;

import sun.misc.BASE64Encoder;

public class base64Util {
	public  static String  Base64Code(byte[] b) {  
        BASE64Encoder encoder = new BASE64Encoder();  
        String codeBase64 = "";  
        StringBuilder pictureBuffer = new StringBuilder();  
        pictureBuffer.append(encoder.encode(b));  
        System.out.println(pictureBuffer.toString());  
//        codeBase64 = pictureBuffer.toString(); 
        codeBase64 = encoder.encodeBuffer(b).trim();
        
        return codeBase64;  
    }  
}
